/**
 * Created with JetBrains WebStorm.
 * User: smd
 * Date: 2/10/14
 * Time: 8:02 AM
 * To change this template use File | Settings | File Templates.
 */

function ComponentVo(rawData) {

    this.rawData = rawData;
    this.componentsList = [];

    ComponentVo.prototype.parse = function() {
        this.componentsList = this.GetComponentsList(this.rawData.ROOT.MAIN);
    }


    ComponentVo.prototype.GetComponentsList= function(data){
        var result = [];
        for(var i= 0; i < data.length; i++)
        {
            var id = data[i]['$']['ID'];
            var text = data[i]['$']['TEXT'];
            var target = data[i]['$']['TARGET'];
           result.push({id:id, text:text, value:'', target:target});
        }
        return result;
    }

}






